package com.hfkh;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class No_3 {
    public static void main(String[] args) {
        System.out.println("\t\t\t直角三角形");
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        System.out.println("============================");
        System.out.println("\t\t\t等腰三角形");
        int num = 0;
        for (int i = 1; i < 6; i++) {
            num++;
            for (int j = 0; j < 6-i; j++) {
                System.out.print(" ");
            }
            for (int k = 1; k <= 2*i-1; k++) {
                System.out.print(num);
            }
            System.out.println();
        }


        System.out.println("============================");
        System.out.println("\t\t\t菱形");
        int size=6;
        for (int i = 1; i <= size; i++) {
            for (int j = 1; j <= size - i; j++) {
                System.out.print(" ");
            }

            for (int k = 1; k <= 2 * i - 1; k++) {
                System.out.print('*');
            }
            System.out.println();
        }

        for (int i = 1; i <= size-1; i++) {
            for (int j = 1; j <= i; j++){
                System.out.print(" ");
            }
            for (int k = 2*size-3; k >= 2 * i - 1; k--){
                System.out.print('*');
            }
            System.out.println();
        }

        System.out.println("============================");
        System.out.println("\t\t\t乘法表");
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(i+"×"+j+"="+i*j+"\t");
            }
            System.out.println();
        }

    }
}
